﻿<?xml version="1.0" encoding="utf-8" ?>
<DbDataRequest connection="$UserLoginDBConnection$" type="$UserLoginDbType$" defaultFormatter="bizobj CompanyTreeNode">
  <SqlStatement hasResults="true">
    SELECT t.CompanyId as id ,t.parentId,t.parentHostId,c.canCreateChildCompanies
    FROM CompanyTree t  INNER JOIN Companies c ON c.id=t.CompanyId
    WHERE t.parentHostId=@parentHostId AND t.companyId=@id
  </SqlStatement>
  <Param name="id" type="UniqueIdentifier"/>
  <Param name="parentHostId" type="UniqueIdentifier"/>
</DbDataRequest>